<!--  -->
<template>
  <div>
    <swiper class="detail-swiper">
      <swiper-item v-for="item in banners" :key="item">
        <img :src="item" alt="">
      </swiper-item>
    </swiper>
  </div>
</template>

<script>
import {Swiper, SwiperItem} from 'components/common/swiper'
export default {
  name: 'DetailSwiper',
  props: {
    banners: {
      type:Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {

    }
  },
  components: {
    Swiper, SwiperItem
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {
  },
  // 生命周期 - 挂载完成（访问DOM元素）
  mounted() {
  }
}
</script>
<style scoped>
/* @import url(); 引入css类 */
.detail-swiper {
  height: 300px;
  overflow: hidden;
}
.detail-swiper img {
  width: 100%;
}
</style>
